<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
          xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<body>
    <p > 当前第<span th:text="${pageInfo.pageNum} "></span>页.每页条数：<span th:text="${pageInfo.pageSize}"></span> 
                    一共 <span th:text="${pageInfo.total}"></span> 条记录
     </p>
   <div class="box-footer clearfix">
        <ul id="page" class="pagination pagination-sm no-margin pull-right">
					
                    <li >
                       
                         <a th:href="@{'javascript:_gotoPage('+${pageInfo.firstPage}+')'}" >首页</a>
                    </li>
                     <!--上一页-->
                     <li  th:if="${pageInfo.hasPreviousPage}">
                         <a  th:href="@{'javascript:_gotoPage('+${pageInfo.prePage}+')'}"  >
          
                          <i class="fa fa-angle-left"></i>&nbsp;上一页
                        </a>
                      </li>
                    <!--循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接-->
                    <th:block th:each="nav : ${pageInfo.navigatepageNums}" >
                        <li  th:class="${nav==pageInfo.pageNum}?'active':''" >
                        <a th:href="@{'javascript:_gotoPage('+${nav}+')'}"
                            th:text="${nav}"></a></li>
                    </th:block>
                    
                    <th:block th:if="${pageInfo.hasNextPage}">
                        <li>
                            <a th:href="@{'javascript:_gotoPage('+${pageInfo.nextPage}+')'}" > 下一页&nbsp;<i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </th:block>
                    <li>
                        <a th:href="@{'javascript:_gotoPage('+${pageInfo.lastPage}+')'}">尾页</a>
                    </li>
                </ul>
      
    </div> 
</body>
     <script type="text/javascript">


    function _gotoPage(pageNo){
    	
    	var form=document.getElementById("from1");
    	$('#pageNo').val(pageNo);
    	addAreaName();
    	form.submit();
    }
</script>
</html>